def merge(a,b,c):
    i = j = 0
    k = 0 
    while i<m and j<n:
        if a[i]<=b[j]:
            c[k]=a[i]
            i+=1
        else:
            c[k]=b[j]
            j+=1
        k+=1

    #如果a序列还有剩余元素
    while i<m:
        c[k]=a[i]
        i+=1
        k+=1
    while j<n:
        c[k]=b[j]
        j+=1
        k+=1

t = input("请输入案例数量").split()
for i in range(T):
    m,*a=map(int , input("请输入A序列元素，空格隔开").split())